<?php
/**
 * Created by JetBrains PhpStorm.
 * User: Skornyakov Anatoliy
 * Date: 30.05.13
 * Time: 17:21
 * 
 */

class Zftest_Form_Company extends Zftest_Form
{
    public function init()
    {
        parent::init();
        $this->setAction('/')
             ->setMethod(Zend_Form::METHOD_POST)
             ->addElements(array(
                 new Zend_Form_Element_Text('name', array(
                     'label'      => 'Название компании',
                     'order'      => 1,
                     'decorators' => $this->getStackDecorators('table', 'elements'),
                     'required'   => true
                 )),
                 new Zend_Form_Element_Text('urAddress', array(
                     'label'      => 'Юридический адрес',
                     'order'      => 2,
                     'decorators' => $this->getStackDecorators('table', 'elements')
                 )),
                 new Zend_Form_Element_Text('currentAccount', array(
                     'label'      => 'Расчётный счёт',
                     'order'      => 3,
                     'decorators' => $this->getStackDecorators('table', 'elements')
                 )),
                 new Zend_Form_Element_Submit('submit', array(
                     'label'      => 'Отправить',
                     'order'      => 4,
                     'decorators' => $this->getStackDecorators('table', 'buttons')
                 ))
        ));

        $this->setDecorators($this->getStackDecorators('table', 'form'));
    }
}